# Contributor: Hannes Braun <hannes@hannesbraun.net>
# Maintainer: Hannes Braun <hannes@hannesbraun.net>
pkgname=ode
pkgver=0.16.5
pkgrel=0
pkgdesc="A free, industrial quality library for simulating rigid body dynamics"
url="https://ode.org/"
arch="all !loongarch64" # compiler errors on loongarch64
license="LGPL-2.1-or-later OR BSD-3-Clause"
makedepends="autoconf automake libtool"
source="https://bitbucket.org/odedevs/ode/downloads/ode-$pkgver.tar.gz"

prepare() {
	default_prepare
	autoreconf -fi
}

build() {
	export CPPFLAGS="$CPPFLAGS -fPIC"
	./configure --enable-double-precision \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
61f9b72e4871df0c6c69f34058ecdcefd3c8d79b29e6019889b9d505d49a5f966fcc3f7f5caf72f1136508a5d487d0af7fc6e18a77b41f3e6f46094743890bf9  ode-0.16.5.tar.gz
"
